<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>03-float的应用</title>
    <style>
        /*body {*/
            /*font-size: 0;*/
        /*}*/

        /*span {
            background-color: #f00;
            float: left;
        }*/

        ul, li {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        ul {
            background-color: #f00;
            height: 30px;
            width: 400px;
            margin: 0 auto;
        }

        li {
            background-color: #0f0;
            float: left;
            margin-right: 10px;
            width: 30px;
            height: 30px;
            line-height: 30px;
            text-align: center;

        }
    </style>
</head>
<body>

<ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
</ul>

<!--<span>span1</span>
<span>span2</span>
<span>span3</span>
<span>span4</span>
<span>span5</span>-->

</body>
</html>